import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

import com.infolab.aims.GlobalConstant;



public class Test {

	public static void main(String[] args) {
		
		
		String sql ="insert into iwsh_admin.BizSafeApplicationENTERPRISE(bizsafeapplicationid,bizsafeapplicationtype,bizsafelevel,bizsafecertificateno,bizsafecompanyname,bizsafestatus,bizsafeactive,bizsafeapprovedate,bizsafeexpirydate,bizsafecreatedate,bizsafecreateby) values";
		sql+="('%1s','%2s','%3s','%4s','%5s','EXP','Y','%6s','%7s','%8s','wiyanto');";
		
		DateTimeFormatter fmt = DateTimeFormat.forPattern(GlobalConstant.DATE_FORMAT_JAVA);
		
		for(int i=1;i<=12;i++)
		{
			String tmp = String.format(sql, "E-2011041250"+i,"CL2009122300231","CL2009122300235","E9420"+i	,"EXPIRY 20110403 L2 "+i,new LocalDate().minusMonths(1).toString(fmt),new LocalDate().minusMonths(1).toString(fmt),new LocalDate().minusMonths(1).toString(fmt));
			System.out.println("company name : EXPIRY 20110403 L2 "+i+" , cert no : "+"E9420"+i);
		}
		for(int i=1;i<=12;i++)
		{
			String tmp = String.format(sql, "E-2011041260"+i,"CL2009122300231","CL2009122300236","E9430"+i	,"EXPIRY 20110403 L3 "+i,new LocalDate().minusMonths(1).toString(fmt),new LocalDate().minusMonths(1).toString(fmt),new LocalDate().minusMonths(1).toString(fmt));
			System.out.println("company name : EXPIRY 20110403 L3 "+i+" , cert no : "+"E9430"+i);
		}
		for(int i=1;i<=12;i++)
		{
			String tmp = String.format(sql, "E-2011041270"+i,"CL2009122300231","CL2009122300238","E9440"+i	,"EXPIRY 20110403 L5 "+i,new LocalDate().minusMonths(1).toString(fmt),new LocalDate().minusMonths(1).toString(fmt),new LocalDate().minusMonths(1).toString(fmt));
			System.out.println("company name : EXPIRY 20110403 L5 "+i+" , cert no : "+"E9440"+i);
		}
		
	}
}
